function initPie( e, data, ref, echarts, chart, that, fn ) {
	// 本月消费的数据
	let pie = {
		dataZoom: [{
			type: 'slider',
			start: 30,
			end: 100,
			zoomLock: false,
		}],
		grid: {
			left: 30,
			right: 30,
			bottom: 30,
			top: 30,
			containLabel: true
		},
		// 收入 房租 水电 吃饭 其他
		color: that.color,
		series: [{
			data: data,
			type: 'pie',
			label: {
				normal: {
					position: 'inner',
					// show : false,
					label:{ 
					show: true, 
						formatter: '{b} : {c} ({d}%)' 
					}, 
					labelLine :{show:true} 
				}
			},
		}]
	}
	let { width, height } = e
	let canvas = that.$refs[ref].canvas
	echarts.setCanvasCreator(() => canvas);
	let lineChart = echarts.init(canvas, null, {
	    width: width,
	    height: height
	})
	canvas.setChart(lineChart)
	lineChart.setOption(pie)
	that.$refs[ref].setChart(lineChart)
	lineChart.on('click', fn)
}

export default initPie